package org.jeecg.modules.columnTopic.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.article.entity.Article;
import org.jeecg.modules.columnTopic.entity.ColumnTopicPublish;
import org.jeecg.modules.columnTopic.vo.WxMessageVO;

import java.util.HashMap;
import java.util.List;

/**
 * @Description: 栏目订阅
 * @Author: jeecg-boot
 * @Date:   2020-12-05
 * @Version: V1.0
 */
public interface IColumnTopicPublishService extends IService<ColumnTopicPublish> {


    /**
     * TODO: 用户订阅信息封装
     *
     *
     * @author ZhangHaoyu
     * @param article
     * @param openId
     * @return org.jeecg.modules.columnTopic.vo.WxMessageVO
     */
    WxMessageVO packageInfo(Article article,String openId);

    /**
     * TODO: 我的订阅功能========
     *     获取栏目信息以及订阅推送的文章
     *
     *
     * @author ZhangHaoyu
     * @param openId
     * @return java.util.Map<java.lang.String,java.lang.Object>
     */
    List<HashMap<String, Object>> getTopicInfo(String openId);

    /**
     * TODO: 根据栏目名称获取id
     *
     *
     * @author ZhangHaoyu
     * @param columnName 栏目名称
     * @return java.lang.String
     */
    String getColumnIdByName(String columnName);

    /**
     * TODO:根据columnId删除订阅信息
     *
     *
     * @author ZhangHaoyu
     * @param id
     * @return void
     */
    void deleteColumnTopicUser(String id);
}
